import { mapMutations } from 'vuex'
const methods={
    ...mapMutations([
        'closeTag'
    ]),
    // 编辑关闭/取消
    closetab(data){
        this.closeTag({
            name: data,
        })
    },
    closetabQuerymeter(data,querymeter){
        this.closeTag({
            name: data,
            query:querymeter
        })
    },
    closetabParams(data,parameter){
        this.closeTag({
            name: data,
            params:parameter
        })
    },
    closetabParamsQuery(data,parameter,querymeter){
        this.closeTag({
            name: data,
            params:parameter,
            query:querymeter
        })
    },
    // 取消
    cancel(data){
        let parmes = {
            name:this.$route.params.name,
            type:this.$route.params.type,
            id:this.$route.params.id
        }
        let queryPar = {
            parentName:this.$route.query.parentName,
            type:this.$route.query.type,
        }
        this.closetabParamsQuery(data,parmes,queryPar)
    },
}
export default {
    methods
}